<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>测试js对象删除一个元素</title>
    <script src="../zujian/han/han.js"></script>
</head>
<body>


<script type="text/javascript">
   var k={a:"1",b:"2"}
    delete k["a"];
    alert(JSON.stringify(k))

    var k1={a:{c:"2"},b:"2"}
   k1=delObjField(k1,"a")
    alert(JSON.stringify(k1));


</script>
</body>
</html>